package com.xuecheng.content.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xuecheng.content.model.po.CourseTeacher;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


public interface CourseTeacherMapper extends BaseMapper<CourseTeacher> {

    @Delete("DELETE FROM course_teacher WHERE course_id = #{courseId} AND id = #{id}")
    public void deleteTeacherBycourseIdAndId(@Param("courseId") Long courseId, @Param("id") Long id);

    @Select("SELECT * FROM course_teacher WHERE course_id = #{courseId} limit 1")

    CourseTeacher selectByCourseId(@Param("courseId") Long courseId);
}
